﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SWDataDB.BLL;
using SWDataDB.DAL;
using SWDataDB.Models;


public partial class GeoDataDetails : System.Web.UI.Page
{
    public string strFileID;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            CheckForm();
            GetContent(strFileID);
        }

    }
    private void CheckForm()
    {
        if (Request["fid"] != null)
        {
            strFileID = Request["fid"];
        }
    }
    private void GetContent(string strFileID)
    {
        ZLInfo ZKFindbyID = new ZLInfo();
        ZL_TBL zlinfo = ZKFindbyID.SelectZLInfoByID(strFileID);

        if (zlinfo != null)
        {
            this.HEAD_TITLE.Text = zlinfo.O_TITLE;
            this.GC_DEPART.Text = zlinfo.O_GC_DEPART;
            this.FILE_ID.Text = zlinfo.O_FILE_ID;
            this.TITLE.Text = zlinfo.O_TITLE;
            this.UNIT.Text = zlinfo.O_UNIT;
            this.HX_PEOPLE.Text = zlinfo.O_HX_PEOPLE;
            this.PEOJ_NAME.Text = zlinfo.O_PEOJ_NAME;
            this.PEOJ_CODE.Text = zlinfo.O_PEOJ_CODE;
            this.DATA_CLASS.Text = zlinfo.O_DATA_CLASS;
            this.CLASS_CODE.Text = zlinfo.O_CLASS_CODE;
            this.ADMIN_REGION.Text = zlinfo.O_ADMIN_REGION;
            this.ADMINREG_CODE.Text = zlinfo.O_ADMINREG_CODE;
            this.MINE_NAME.Text = zlinfo.O_MINE_NAME;
            this.SHEET_NAME.Text = zlinfo.O_SHEET_NAME;
            this.SHEET_ID.Text = zlinfo.O_SHEET_ID;
            this.WORK_LEVEL.Text = zlinfo.O_WORK_LEVEL;
            this.WORKLEVEL_ID.Text = zlinfo.O_WORKLEVEL_ID;
            this.START_DATE.Text = zlinfo.O_START_DATE;
            this.END_DATE.Text = zlinfo.O_END_DATE;
            //this.START_LONGITUDE.Text = zlinfo.O_START_LONGITUDE.ToString() ;
            //this.START_LATITUDE.Text = zlinfo.O_START_LONGITUDE.ToString();
            //this.END_LONGITUDE.Text = zlinfo.O_START_LONGITUDE.ToString();
            //this.END_LATITUDE.Text = zlinfo.O_END_LATITUDE.ToString();


            this.START_LONGITUDE_D.Text = Convert.ToString(zlinfo.O_START_LONGITUDE).Substring(0, 3);
            this.START_LONGITUDE_F.Text = Convert.ToString(zlinfo.O_START_LONGITUDE).Substring(3, 2);
            this.START_LONGITUDE_M.Text = Convert.ToString(zlinfo.O_START_LONGITUDE).Substring(5);

            this.END_LONGITUDE_D.Text = Convert.ToString(zlinfo.O_END_LONGITUDE).Substring(0, 3);
            this.END_LONGITUDE_F.Text = Convert.ToString(zlinfo.O_END_LONGITUDE).Substring(3, 2);
            this.END_LONGITUDE_M.Text = Convert.ToString(zlinfo.O_END_LONGITUDE).Substring(5);

            this.START_LATITUDE_D.Text = Convert.ToString(zlinfo.O_START_LATITUDE).Substring(0, 2);
            this.START_LATITUDE_F.Text = Convert.ToString(zlinfo.O_START_LATITUDE).Substring(2, 2);
            this.START_LATITUDE_M.Text = Convert.ToString(zlinfo.O_START_LATITUDE).Substring(4);

            this.END_LATITUDE_D.Text = Convert.ToString(zlinfo.O_END_LATITUDE).Substring(0, 2);
            this.END_LATITUDE_F.Text = Convert.ToString(zlinfo.O_END_LATITUDE).Substring(2, 2);
            this.END_LATITUDE_M.Text = Convert.ToString(zlinfo.O_END_LATITUDE).Substring(4);



            this.MAJOR_MINE.Text = zlinfo.O_MAJOR_MINE;
            this.MINE_CODE.Text = zlinfo.O_MINE_CODE;
            this.PUTIN_DATE.Text = zlinfo.O_PUTIN_DATE;
            this.TRANSF_CODE.Text = zlinfo.O_TRANSF_CODE;

            this.YXIN_NUM_ZL.Text = zlinfo.O_YXIN_NUM_ZL.ToString();
            this.YXIN_NUM_X.Text = zlinfo.O_YXIN_NUM_X.ToString();
            this.YXIN_NUM_M.Text = zlinfo.O_YXIN_NUM_M.ToString();
            this.YXIE_NUM_ZL.Text = zlinfo.O_YXIE_NUM_ZL.ToString();
            this.YXIE_NUM_X.Text = zlinfo.O_YXIE_NUM_X.ToString();
            this.YXIE_NUM_D.Text = zlinfo.O_YXIE_NUM_D.ToString();
            this.BB_NUM_X.Text = zlinfo.O_BB_NUM_X.ToString();
            this.BB_NUM_K.Text = zlinfo.O_BB_NUM_K.ToString();
            //this.BB_NUM_K_BIG.Text = zlinfo.O_BB_NUM_K_BIG.ToString();
            this.GP_NUM_H.Text = zlinfo.O_GP_NUM_H.ToString();
            this.GP_NUM_J.Text = zlinfo.O_GP_NUM_J.ToString();
            this.YP_NUM_X.Text = zlinfo.O_YP_NUM_X.ToString();
            this.YP_NUM_D.Text = zlinfo.O_YP_NUM_D.ToString();
            this.BP_NUM_H.Text = zlinfo.O_BP_NUM_H.ToString();
            this.BP_NUM_J.Text = zlinfo.O_BP_NUM_J.ToString();
            this.QTSW_NUM_X.Text = zlinfo.O_QTSW_NUM_X.ToString();
            this.QTSW_NUM_J.Text = zlinfo.O_QTSW_NUM_J.ToString();
            this.XGZL_NUM_W.Text = zlinfo.O_XGZL_NUM_W.ToString();
            this.XGZL_NUM_T.Text = zlinfo.O_XGZL_NUM_T.ToString();
            // this.XGZL_NUM_J.Text = zlinfo.O_XGZL_NUM_J.ToString();

            this.SECU_LEVEL.Text = zlinfo.O_SECU_LEVEL;
            this.SECU_ID.Text = zlinfo.O_SECU_ID;
            this.SECU_ITEMS.Text = zlinfo.O_SECU_ITEMS;
            this.PROTECT_DATE.Text = zlinfo.O_PROTECT_DATE;
            this.DEAD_LINE.Text = zlinfo.O_DEAD_LINE;
            this.CG_UNIT.Text = zlinfo.O_CG_UNIT;
            this.CG_CODE.Text = zlinfo.O_CG_CODE;
            this.YS_UNIT.Text = zlinfo.O_YS_UNIT;
            this.YS_CODE.Text = zlinfo.O_YS_CODE;
            this.KEY_WORDS.Text = zlinfo.O_KEY_WORDS;
            this.ABSTRACT.Text = zlinfo.O_ABSTRACT;
        }
        else
        {
            this.UNIT.Text = "没有找到相关表信息！";
        }
    }
}
